Commit fa3b1ff589904ec6d0cebcbdc934836bc98762c3
Parents : 3b3d59f
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-04-09T14:31:58-05:00
chore(codebase): formatting with ruff and eslint/prettier
Changes
13 files changed, 128 insertions(+), 127 deletions(-)
Diff
diff --git a/README.md b/README.md
index 6536dc11..0c3b7962 100644
--- a/README.md
+++ b/README.md
@@ -194,17 +194,17 @@ Use the dedicated docs:
MeshChatX supports both CLI args and env vars.
-| Argument | Environment Variable | Default | Description |
-| -------------------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web server bind address |
-| `--port` | `MESHCHAT_PORT` | `8000` | Web server port |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Disable HTTPS |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (none) | PEM certificate and private key paths; both must be set together. Overrides auto-generated certs under the identity `ssl/` directory. |
+| Argument | Environment Variable | Default | Description |
+| -------------------------- | ---------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web server bind address |
+| `--port` | `MESHCHAT_PORT` | `8000` | Web server port |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Disable HTTPS |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (none) | PEM certificate and private key paths; both must be set together. Overrides auto-generated certs under the identity `ssl/` directory. |
| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (none) | Reticulum (RNS) stack log level: `none`, `critical`, `error`, `warning`, `notice`, `verbose`, `debug`, `extreme`, or a numeric level. CLI overrides env when both are set. |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | Do not auto-launch browser |
-| `--auth` | `MESHCHAT_AUTH` | `false` | Enable basic auth |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Data directory |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundled | Frontend files directory (needed for source installs without bundled assets) |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | Do not auto-launch browser |
+| `--auth` | `MESHCHAT_AUTH` | `false` | Enable basic auth |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Data directory |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundled | Frontend files directory (needed for source installs without bundled assets) |
## Branches
diff --git a/lang/README.de.md b/lang/README.de.md
index c8e36409..a4a4e8d0 100644
--- a/lang/README.de.md
+++ b/lang/README.de.md
@@ -190,17 +190,17 @@ task dist:fe:rpm
## Konfiguration
-| Argument | Umgebungsvariable | Standard | Beschreibung |
-| -------------------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Webserver-Bind-Adresse |
-| `--port` | `MESHCHAT_PORT` | `8000` | Webserver-Port |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | HTTPS deaktivieren |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (keine) | PEM-Zertifikat und Schluessel; beide setzen. Ueberschreibt automatisch erzeugte Zertifikate unter der Identitaet im Verzeichnis `ssl/`. |
+| Argument | Umgebungsvariable | Standard | Beschreibung |
+| -------------------------- | ---------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Webserver-Bind-Adresse |
+| `--port` | `MESHCHAT_PORT` | `8000` | Webserver-Port |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | HTTPS deaktivieren |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (keine) | PEM-Zertifikat und Schluessel; beide setzen. Ueberschreibt automatisch erzeugte Zertifikate unter der Identitaet im Verzeichnis `ssl/`. |
| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (keine) | Reticulum (RNS) Log-Level: `none`, `critical`, `error`, `warning`, `notice`, `verbose`, `debug`, `extreme` oder numerisch. CLI ueberschreibt die Umgebungsvariable, wenn beide gesetzt sind. |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | Browser nicht automatisch oeffnen |
-| `--auth` | `MESHCHAT_AUTH` | `false` | Basis-Authentifizierung aktivieren |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Datenverzeichnis |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundled | Frontend-Verzeichnis (fuer Installationen ohne gebundelte Assets) |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | Browser nicht automatisch oeffnen |
+| `--auth` | `MESHCHAT_AUTH` | `false` | Basis-Authentifizierung aktivieren |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Datenverzeichnis |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundled | Frontend-Verzeichnis (fuer Installationen ohne gebundelte Assets) |
## Branches
@@ -222,14 +222,14 @@ task build:all
`Makefile`-Kurzformen:
-| Befehl | Beschreibung |
-| -------------- | ------------------------------------------------- |
-| `make install` | pnpm- und Poetry-Abhaengigkeiten installieren |
-| `make run` | MeshChatX ueber Poetry starten |
-| `make build` | Frontend bauen |
-| `make lint` | eslint und ruff ausfuehren |
-| `make test` | Frontend- und Backend-Tests |
-| `make clean` | Build-Artefakte und node_modules entfernen |
+| Befehl | Beschreibung |
+| -------------- | --------------------------------------------- |
+| `make install` | pnpm- und Poetry-Abhaengigkeiten installieren |
+| `make run` | MeshChatX ueber Poetry starten |
+| `make build` | Frontend bauen |
+| `make lint` | eslint und ruff ausfuehren |
+| `make test` | Frontend- und Backend-Tests |
+| `make clean` | Build-Artefakte und node_modules entfernen |
## Versionierung
diff --git a/lang/README.it.md b/lang/README.it.md
index d673d1e6..af957efd 100644
--- a/lang/README.it.md
+++ b/lang/README.it.md
@@ -190,17 +190,17 @@ task dist:fe:rpm
## Configurazione
-| Argomento | Variabile d'ambiente | Predefinito | Descrizione |
-| -------------------------- | ---------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Indirizzo di bind del web server |
-| `--port` | `MESHCHAT_PORT` | `8000` | Porta del web server |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Disattiva HTTPS |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (nessuno) | Percorsi PEM certificato e chiave; impostare entrambi. Sostituisce i certificati auto-generati sotto l'identita nella directory `ssl/`. |
+| Argomento | Variabile d'ambiente | Predefinito | Descrizione |
+| -------------------------- | ---------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Indirizzo di bind del web server |
+| `--port` | `MESHCHAT_PORT` | `8000` | Porta del web server |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Disattiva HTTPS |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (nessuno) | Percorsi PEM certificato e chiave; impostare entrambi. Sostituisce i certificati auto-generati sotto l'identita nella directory `ssl/`. |
| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (nessuno) | Livello di log Reticulum (RNS): `none`, `critical`, `error`, `warning`, `notice`, `verbose`, `debug`, `extreme` o numerico. La CLI ha priorita sulla variabile d'ambiente se entrambe sono impostate. |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | Non aprire il browser automaticamente |
-| `--auth` | `MESHCHAT_AUTH` | `false` | Attiva autenticazione base |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Directory dei dati |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundle | Directory dei file frontend (per installazioni senza asset inclusi) |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | Non aprire il browser automaticamente |
+| `--auth` | `MESHCHAT_AUTH` | `false` | Attiva autenticazione base |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Directory dei dati |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | auto/bundle | Directory dei file frontend (per installazioni senza asset inclusi) |
## Branch
@@ -222,14 +222,14 @@ task build:all
Scorciatoie `Makefile`:
-| Comando | Descrizione |
-| -------------- | ------------------------------------------------ |
-| `make install` | Installa dipendenze pnpm e poetry |
-| `make run` | Esegue MeshChatX tramite poetry |
-| `make build` | Compila il frontend |
-| `make lint` | Esegue eslint e ruff |
-| `make test` | Test frontend e backend |
-| `make clean` | Rimuove artefatti di build e node_modules |
+| Comando | Descrizione |
+| -------------- | ----------------------------------------- |
+| `make install` | Installa dipendenze pnpm e poetry |
+| `make run` | Esegue MeshChatX tramite poetry |
+| `make build` | Compila il frontend |
+| `make lint` | Esegue eslint e ruff |
+| `make test` | Test frontend e backend |
+| `make clean` | Rimuove artefatti di build e node_modules |
## Versioning
diff --git a/lang/README.ja.md b/lang/README.ja.md
index c9a0cb86..57fda1bb 100644
--- a/lang/README.ja.md
+++ b/lang/README.ja.md
@@ -190,24 +190,24 @@ task dist:fe:rpm
## 設定
-| 引数 | 環境変数 | デフォルト | 説明 |
-| -------------------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------ |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web サーバーのバインドアドレス |
-| `--port` | `MESHCHAT_PORT` | `8000` | Web サーバーポート |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | HTTPS を無効化 |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (なし) | PEM 証明書と鍵のパス。両方指定。アイデンティティの `ssl/` 下の自動生成証明書を上書き。 |
-| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (なし) | Reticulum(RNS)のログレベル(上記の名前または数値)。CLI は環境変数より優先。 |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | ブラウザを自動で開かない |
-| `--auth` | `MESHCHAT_AUTH` | `false` | 基本認証を有効化 |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | データディレクトリ |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | 自動/同梱 | フロントエンドファイルディレクトリ(同梱資産のないインストール向け) |
+| 引数 | 環境変数 | デフォルト | 説明 |
+| -------------------------- | ---------------------------------------- | ----------- | -------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web サーバーのバインドアドレス |
+| `--port` | `MESHCHAT_PORT` | `8000` | Web サーバーポート |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | HTTPS を無効化 |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (なし) | PEM 証明書と鍵のパス。両方指定。アイデンティティの `ssl/` 下の自動生成証明書を上書き。 |
+| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (なし) | Reticulum(RNS)のログレベル(上記の名前または数値)。CLI は環境変数より優先。 |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | ブラウザを自動で開かない |
+| `--auth` | `MESHCHAT_AUTH` | `false` | 基本認証を有効化 |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | データディレクトリ |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | 自動/同梱 | フロントエンドファイルディレクトリ(同梱資産のないインストール向け) |
## ブランチ
-| ブランチ | 目的 |
-| -------- | ------------------------------------------------------------ |
-| `master` | 安定版リリース。本番向けのコードのみ。 |
-| `dev` | 活発な開発。不安定または不完全な変更を含む場合があります。 |
+| ブランチ | 目的 |
+| -------- | ---------------------------------------------------------- |
+| `master` | 安定版リリース。本番向けのコードのみ。 |
+| `dev` | 活発な開発。不安定または不完全な変更を含む場合があります。 |
## 開発
@@ -222,14 +222,14 @@ task build:all
`Makefile` のショートカット:
-| コマンド | 説明 |
-| -------------- | ------------------------------------------ |
-| `make install` | pnpm と poetry の依存関係をインストール |
-| `make run` | poetry 経由で MeshChatX を実行 |
-| `make build` | フロントエンドをビルド |
-| `make lint` | eslint と ruff を実行 |
-| `make test` | フロントエンドとバックエンドのテスト |
-| `make clean` | ビルド成果物と node_modules を削除 |
+| コマンド | 説明 |
+| -------------- | --------------------------------------- |
+| `make install` | pnpm と poetry の依存関係をインストール |
+| `make run` | poetry 経由で MeshChatX を実行 |
+| `make build` | フロントエンドをビルド |
+| `make lint` | eslint と ruff を実行 |
+| `make test` | フロントエンドとバックエンドのテスト |
+| `make clean` | ビルド成果物と node_modules を削除 |
## バージョン管理
diff --git a/lang/README.ru.md b/lang/README.ru.md
index d4961483..92bcdfdc 100644
--- a/lang/README.ru.md
+++ b/lang/README.ru.md
@@ -190,24 +190,24 @@ task dist:fe:rpm
## Конфигурация
-| Аргумент | Переменная окружения | По умолчанию | Описание |
-| -------------------------- | ---------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Адрес привязки веб-сервера |
-| `--port` | `MESHCHAT_PORT` | `8000` | Порт веб-сервера |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Отключить HTTPS |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (нет) | Пути к PEM-сертификату и ключу; задаются вместе. Переопределяют автосгенерированные сертификаты в каталоге `ssl/` у идентичности. |
+| Аргумент | Переменная окружения | По умолчанию | Описание |
+| -------------------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Адрес привязки веб-сервера |
+| `--port` | `MESHCHAT_PORT` | `8000` | Порт веб-сервера |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | Отключить HTTPS |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (нет) | Пути к PEM-сертификату и ключу; задаются вместе. Переопределяют автосгенерированные сертификаты в каталоге `ssl/` у идентичности. |
| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (нет) | Уровень лога стека Reticulum (RNS): `none`, `critical`, `error`, `warning`, `notice`, `verbose`, `debug`, `extreme` или число. CLI перекрывает переменную окружения, если заданы оба. |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | Не открывать браузер автоматически |
-| `--auth` | `MESHCHAT_AUTH` | `false` | Базовая аутентификация |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Каталог данных |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | авто/bundled | Каталог фронтенда (для установок без встроенных ресурсов) |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | Не открывать браузер автоматически |
+| `--auth` | `MESHCHAT_AUTH` | `false` | Базовая аутентификация |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | Каталог данных |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | авто/bundled | Каталог фронтенда (для установок без встроенных ресурсов) |
## Ветки
-| Ветка | Назначение |
-| -------- | ------------------------------------------------------------------------- |
-| `master` | Стабильные релизы. Только код для продакшена. |
-| `dev` | Активная разработка. Возможны нестабильные или неполные изменения. |
+| Ветка | Назначение |
+| -------- | ------------------------------------------------------------------ |
+| `master` | Стабильные релизы. Только код для продакшена. |
+| `dev` | Активная разработка. Возможны нестабильные или неполные изменения. |
## Разработка
@@ -222,14 +222,14 @@ task build:all
Сокращения `Makefile`:
-| Команда | Описание |
-| -------------- | ------------------------------------------ |
-| `make install` | Установить зависимости pnpm и poetry |
-| `make run` | Запуск MeshChatX через poetry |
-| `make build` | Сборка фронтенда |
-| `make lint` | eslint и ruff |
-| `make test` | Тесты фронтенда и бэкенда |
-| `make clean` | Удалить артефакты сборки и node_modules |
+| Команда | Описание |
+| -------------- | --------------------------------------- |
+| `make install` | Установить зависимости pnpm и poetry |
+| `make run` | Запуск MeshChatX через poetry |
+| `make build` | Сборка фронтенда |
+| `make lint` | eslint и ruff |
+| `make test` | Тесты фронтенда и бэкенда |
+| `make clean` | Удалить артефакты сборки и node_modules |
## Версионирование
diff --git a/lang/README.zh.md b/lang/README.zh.md
index 1298d662..de0b2d58 100644
--- a/lang/README.zh.md
+++ b/lang/README.zh.md
@@ -190,17 +190,17 @@ task dist:fe:rpm
## 配置
-| 参数 | 环境变量 | 默认值 | 说明 |
-| -------------------------- | ---------------------------------------- | ------------ | -------------------------------------------------------------------------------------------- |
-| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web 服务器绑定地址 |
-| `--port` | `MESHCHAT_PORT` | `8000` | Web 服务器端口 |
-| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | 禁用 HTTPS |
-| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (无) | PEM 证书与私钥路径;需同时设置。覆盖身份下 `ssl/` 目录中自动生成的证书。 |
-| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (无) | Reticulum(RNS)日志级别:`none`、`critical`、`error` 等或数值。同时设置时 CLI 优先于环境变量。 |
-| `--headless` | `MESHCHAT_HEADLESS` | `false` | 不自动打开浏览器 |
-| `--auth` | `MESHCHAT_AUTH` | `false` | 启用基本认证 |
-| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | 数据目录 |
-| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | 自动/捆绑 | 前端文件目录(无捆绑资源安装时需要) |
+| 参数 | 环境变量 | 默认值 | 说明 |
+| -------------------------- | ---------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------- |
+| `--host` | `MESHCHAT_HOST` | `127.0.0.1` | Web 服务器绑定地址 |
+| `--port` | `MESHCHAT_PORT` | `8000` | Web 服务器端口 |
+| `--no-https` | `MESHCHAT_NO_HTTPS` | `false` | 禁用 HTTPS |
+| `--ssl-cert` / `--ssl-key` | `MESHCHAT_SSL_CERT` / `MESHCHAT_SSL_KEY` | (无) | PEM 证书与私钥路径;需同时设置。覆盖身份下 `ssl/` 目录中自动生成的证书。 |
+| `--rns-log-level` | `MESHCHAT_RNS_LOG_LEVEL` | (无) | Reticulum(RNS)日志级别:`none`、`critical`、`error` 等或数值。同时设置时 CLI 优先于环境变量。 |
+| `--headless` | `MESHCHAT_HEADLESS` | `false` | 不自动打开浏览器 |
+| `--auth` | `MESHCHAT_AUTH` | `false` | 启用基本认证 |
+| `--storage-dir` | `MESHCHAT_STORAGE_DIR` | `./storage` | 数据目录 |
+| `--public-dir` | `MESHCHAT_PUBLIC_DIR` | 自动/捆绑 | 前端文件目录(无捆绑资源安装时需要) |
## 分支
@@ -222,13 +222,13 @@ task build:all
`Makefile` 快捷方式:
-| 命令 | 说明 |
-| -------------- | ---------------------------- |
-| `make install` | 安装 pnpm 与 poetry 依赖 |
-| `make run` | 通过 poetry 运行 MeshChatX |
-| `make build` | 构建前端 |
-| `make lint` | 运行 eslint 与 ruff |
-| `make test` | 运行前端与后端测试 |
+| 命令 | 说明 |
+| -------------- | --------------------------- |
+| `make install` | 安装 pnpm 与 poetry 依赖 |
+| `make run` | 通过 poetry 运行 MeshChatX |
+| `make build` | 构建前端 |
+| `make lint` | 运行 eslint 与 ruff |
+| `make test` | 运行前端与后端测试 |
| `make clean` | 移除构建产物与 node_modules |
## 版本
diff --git a/meshchatx/meshchat.py b/meshchatx/meshchat.py
index ac5ec5e9..eec7e3cf 100644
--- a/meshchatx/meshchat.py
+++ b/meshchatx/meshchat.py
@@ -8179,7 +8179,8 @@ class ReticulumMeshChat:
index = int(file_index)
if index < 0:
return web.json_response(
- {"message": "Invalid file index"}, status=400,
+ {"message": "Invalid file index"},
+ status=400,
)
file_attachment = fields["file_attachments"][index]
file_data = base64.b64decode(file_attachment["file_bytes"])
@@ -8700,7 +8701,8 @@ class ReticulumMeshChat:
except Exception as e:
RNS.log(f"Error in notifications_get: {e}", RNS.LOG_ERROR)
return web.json_response(
- {"error": "Internal error"}, status=500,
+ {"error": "Internal error"},
+ status=500,
)
# get blocked destinations
@@ -9140,7 +9142,8 @@ class ReticulumMeshChat:
base = os.path.realpath(mbtiles_dir)
if not resolved.startswith(base + os.sep):
return web.json_response(
- {"error": "Invalid filename"}, status=400,
+ {"error": "Invalid filename"},
+ status=400,
)
size = 0
diff --git a/meshchatx/src/backend/docs_manager.py b/meshchatx/src/backend/docs_manager.py
index 78e1f6b8..2a9297e4 100644
--- a/meshchatx/src/backend/docs_manager.py
+++ b/meshchatx/src/backend/docs_manager.py
@@ -651,9 +651,7 @@ class DocsManager:
else:
shutil.copy2(s, d)
else:
- safe_members = [
- m for m in namelist if ".." not in m.split("/")
- ]
+ safe_members = [m for m in namelist if ".." not in m.split("/")]
zip_ref.extractall(temp_extract, members=safe_members)
src_path = os.path.join(temp_extract, root_folder)
if os.path.exists(src_path) and os.path.isdir(src_path):
diff --git a/meshchatx/src/backend/rncp_handler.py b/meshchatx/src/backend/rncp_handler.py
index 94c767cc..a8f057b9 100644
--- a/meshchatx/src/backend/rncp_handler.py
+++ b/meshchatx/src/backend/rncp_handler.py
@@ -149,7 +149,9 @@ class RNCPHandler:
if self.fetch_jail:
if data.startswith(self.fetch_jail + "/"):
data = data.replace(self.fetch_jail + "/", "")
- file_path = os.path.realpath(os.path.expanduser(f"{self.fetch_jail}/{data}"))
+ file_path = os.path.realpath(
+ os.path.expanduser(f"{self.fetch_jail}/{data}")
+ )
jail_real = os.path.realpath(self.fetch_jail)
if not file_path.startswith(jail_real + "/"):
return self.REQ_FETCH_NOT_ALLOWED
diff --git a/meshchatx/src/frontend/components/NotificationBell.vue b/meshchatx/src/frontend/components/NotificationBell.vue
index bff2ba2c..63f56fe8 100644
--- a/meshchatx/src/frontend/components/NotificationBell.vue
+++ b/meshchatx/src/frontend/components/NotificationBell.vue
@@ -72,11 +72,7 @@
class="w-12 h-12 mx-auto text-gray-400 dark:text-gray-500"
/>
<div class="mt-2 text-sm text-gray-500 dark:text-gray-400">
- {{
- showHistory
- ? $t("app.notifications_empty_history")
- : $t("app.notifications_no_new")
- }}
+ {{ showHistory ? $t("app.notifications_empty_history") : $t("app.notifications_no_new") }}
</div>
</div>
diff --git a/tests/backend/test_docs_manager.py b/tests/backend/test_docs_manager.py
index 59c1689c..b0c29c62 100644
--- a/tests/backend/test_docs_manager.py
+++ b/tests/backend/test_docs_manager.py
@@ -104,7 +104,9 @@ def test_download_task_success(mock_session_cls, docs_manager, temp_dirs):
async def iter_chunked(_n):
yield b"data" * 25
- mock_response.content.iter_chunked = MagicMock(side_effect=lambda n: iter_chunked(n))
+ mock_response.content.iter_chunked = MagicMock(
+ side_effect=lambda n: iter_chunked(n)
+ )
mock_get = MagicMock()
mock_get.__aenter__ = AsyncMock(return_value=mock_response)
diff --git a/tests/backend/test_notification_unread_semantics.py b/tests/backend/test_notification_unread_semantics.py
index d58ba3a8..182ed711 100644
--- a/tests/backend/test_notification_unread_semantics.py
+++ b/tests/backend/test_notification_unread_semantics.py
@@ -9,7 +9,9 @@ import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
-from meshchatx.src.backend.lxmf_utils import compute_lxmf_conversation_unread_from_latest_row
+from meshchatx.src.backend.lxmf_utils import (
+ compute_lxmf_conversation_unread_from_latest_row,
+)
def _row(incoming, last_read_iso, ts):
diff --git a/tests/frontend/NotificationBell.test.js b/tests/frontend/NotificationBell.test.js
index 019e1ec5..232f163c 100644
--- a/tests/frontend/NotificationBell.test.js
+++ b/tests/frontend/NotificationBell.test.js
@@ -127,12 +127,10 @@ describe("NotificationBell UI", () => {
});
const wrapper = mountBell({ attachTo: document.body });
await wrapper.vm.$nextTick();
- const notifGetsAfterMount = global.api.get.mock.calls.filter((c) => c[0] === "/api/v1/notifications")
- .length;
+ const notifGetsAfterMount = global.api.get.mock.calls.filter((c) => c[0] === "/api/v1/notifications").length;
await wrapper.find("button").trigger("click");
await new Promise((r) => setTimeout(r, 150));
- const notifGetsAfterOpen = global.api.get.mock.calls.filter((c) => c[0] === "/api/v1/notifications")
- .length;
+ const notifGetsAfterOpen = global.api.get.mock.calls.filter((c) => c[0] === "/api/v1/notifications").length;
expect(notifGetsAfterOpen - notifGetsAfterMount).toBe(1);
wrapper.unmount();
});
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────